package com.hxstrive;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Map;

@Controller
public class HomeController {

    @RequestMapping("/")
    public String home(Map<String,Object> map) {
        map.put("title", "Spring 集成 FreeMarker");
        map.put("date", new SimpleDateFormat(
                "yyyy-MM-dd HH:mm:ss").format(new Date()));
        return "index.ftl";
    }

}
